var ws = require("ws");
var server = new ws.Server({
	// host: ip, // 如果加了host，外部链接不上
	port: 6080,
});

function on_server_client_comming (client_sock) {
}
server.on("connection", on_server_client_comming);

function on_server_listen_error(err) {
	console.log("ws server listen error!!");
}
server.on("error", on_server_listen_error);

function on_server_listen_close(err) {
	console.log("ws server listen close!!");
}
server.on("close", on_server_listen_close);
server.close();
